Integrand size = 41, antiderivative size = 195 \[ \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {(B-4 C) x}{a^4}+\frac {(6 A-55 B+244 C) \sin (c+d x)}{105 a^4 d}+\frac {(3 A+25 B-88 C) \cos ^2(c+d x) \sin (c+d x)}{105 a^4 d (1+\cos (c+d x))^2}-\frac {(B-4 C) \sin (c+d x)}{a^4 d (1+\cos (c+d x))}-\frac {(A-B+C) \cos ^4(c+d x) \sin (c+d x)}{7 d (a+a \cos (c+d x))^4}+\frac {(2 A+5 B-12 C) \cos ^3(c+d x) \sin (c+d x)}{35 a d (a+a \cos (c+d x))^3} \]
(B-4*C)*x/a^4+1/105*(6*A-55*B+244*C)*sin(d*x+c)/a^4/d+1/105*(3*A+25*B-88*C )*cos(d*x+c)^2*sin(d*x+c)/a^4/d/(1+cos(d*x+c))^2-(B-4*C)*sin(d*x+c)/a^4/d/ (1+cos(d*x+c))-1/7*(A-B+C)*cos(d*x+c)^4*sin(d*x+c)/d/(a+a*cos(d*x+c))^4+1/ 35*(2*A+5*B-12*C)*cos(d*x+c)^3*sin(d*x+c)/a/d/(a+a*cos(d*x+c))^3
Leaf count is larger than twice the leaf count of optimal. \(571\) vs. \(2(195)=390\).
Time = 7.18 (sec) , antiderivative size = 571, normalized size of antiderivative = 2.93 \[ \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {\cos \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \left (7350 (B-4 C) d x \cos \left (\frac {d x}{2}\right )+7350 (B-4 C) d x \cos \left (c+\frac {d x}{2}\right )+4410 B d x \cos \left (c+\frac {3 d x}{2}\right )-17640 C d x \cos \left (c+\frac {3 d x}{2}\right )+4410 B d x \cos \left (2 c+\frac {3 d x}{2}\right )-17640 C d x \cos \left (2 c+\frac {3 d x}{2}\right )+1470 B d x \cos \left (2 c+\frac {5 d x}{2}\right )-5880 C d x \cos \left (2 c+\frac {5 d x}{2}\right )+1470 B d x \cos \left (3 c+\frac {5 d x}{2}\right )-5880 C d x \cos \left (3 c+\frac {5 d x}{2}\right )+210 B d x \cos \left (3 c+\frac {7 d x}{2}\right )-840 C d x \cos \left (3 c+\frac {7 d x}{2}\right )+210 B d x \cos \left (4 c+\frac {7 d x}{2}\right )-840 C d x \cos \left (4 c+\frac {7 d x}{2}\right )+2520 A \sin \left (\frac {d x}{2}\right )-19880 B \sin \left (\frac {d x}{2}\right )+60830 C \sin \left (\frac {d x}{2}\right )-2520 A \sin \left (c+\frac {d x}{2}\right )+16520 B \sin \left (c+\frac {d x}{2}\right )-46130 C \sin \left (c+\frac {d x}{2}\right )+1764 A \sin \left (c+\frac {3 d x}{2}\right )-14280 B \sin \left (c+\frac {3 d x}{2}\right )+46116 C \sin \left (c+\frac {3 d x}{2}\right )-1260 A \sin \left (2 c+\frac {3 d x}{2}\right )+7560 B \sin \left (2 c+\frac {3 d x}{2}\right )-18060 C \sin \left (2 c+\frac {3 d x}{2}\right )+588 A \sin \left (2 c+\frac {5 d x}{2}\right )-5600 B \sin \left (2 c+\frac {5 d x}{2}\right )+19292 C \sin \left (2 c+\frac {5 d x}{2}\right )-420 A \sin \left (3 c+\frac {5 d x}{2}\right )+1680 B \sin \left (3 c+\frac {5 d x}{2}\right )-2100 C \sin \left (3 c+\frac {5 d x}{2}\right )+144 A \sin \left (3 c+\frac {7 d x}{2}\right )-1040 B \sin \left (3 c+\frac {7 d x}{2}\right )+3791 C \sin \left (3 c+\frac {7 d x}{2}\right )+735 C \sin \left (4 c+\frac {7 d x}{2}\right )+105 C \sin \left (4 c+\frac {9 d x}{2}\right )+105 C \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{1680 a^4 d (1+\cos (c+d x))^4} \]
(Cos[(c + d*x)/2]*Sec[c/2]*(7350*(B - 4*C)*d*x*Cos[(d*x)/2] + 7350*(B - 4* C)*d*x*Cos[c + (d*x)/2] + 4410*B*d*x*Cos[c + (3*d*x)/2] - 17640*C*d*x*Cos[ c + (3*d*x)/2] + 4410*B*d*x*Cos[2*c + (3*d*x)/2] - 17640*C*d*x*Cos[2*c + ( 3*d*x)/2] + 1470*B*d*x*Cos[2*c + (5*d*x)/2] - 5880*C*d*x*Cos[2*c + (5*d*x) /2] + 1470*B*d*x*Cos[3*c + (5*d*x)/2] - 5880*C*d*x*Cos[3*c + (5*d*x)/2] + 210*B*d*x*Cos[3*c + (7*d*x)/2] - 840*C*d*x*Cos[3*c + (7*d*x)/2] + 210*B*d* x*Cos[4*c + (7*d*x)/2] - 840*C*d*x*Cos[4*c + (7*d*x)/2] + 2520*A*Sin[(d*x) /2] - 19880*B*Sin[(d*x)/2] + 60830*C*Sin[(d*x)/2] - 2520*A*Sin[c + (d*x)/2 ] + 16520*B*Sin[c + (d*x)/2] - 46130*C*Sin[c + (d*x)/2] + 1764*A*Sin[c + ( 3*d*x)/2] - 14280*B*Sin[c + (3*d*x)/2] + 46116*C*Sin[c + (3*d*x)/2] - 1260 *A*Sin[2*c + (3*d*x)/2] + 7560*B*Sin[2*c + (3*d*x)/2] - 18060*C*Sin[2*c + (3*d*x)/2] + 588*A*Sin[2*c + (5*d*x)/2] - 5600*B*Sin[2*c + (5*d*x)/2] + 19 292*C*Sin[2*c + (5*d*x)/2] - 420*A*Sin[3*c + (5*d*x)/2] + 1680*B*Sin[3*c + (5*d*x)/2] - 2100*C*Sin[3*c + (5*d*x)/2] + 144*A*Sin[3*c + (7*d*x)/2] - 1 040*B*Sin[3*c + (7*d*x)/2] + 3791*C*Sin[3*c + (7*d*x)/2] + 735*C*Sin[4*c + (7*d*x)/2] + 105*C*Sin[4*c + (9*d*x)/2] + 105*C*Sin[5*c + (9*d*x)/2]))/(1 680*a^4*d*(1 + Cos[c + d*x])^4)
Time = 1.56 (sec) , antiderivative size = 211, normalized size of antiderivative = 1.08, number of steps used = 15, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.366, Rules used = {3042, 3520, 3042, 3456, 3042, 3456, 3042, 3447, 3042, 3502, 27, 3042, 3214, 3042, 3127}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a \cos (c+d x)+a)^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )+C \sin \left (c+d x+\frac {\pi }{2}\right )^2\right )}{\left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^4}dx\) |
\(\Big \downarrow \) 3520 |
\(\displaystyle \frac {\int \frac {\cos ^3(c+d x) (a (3 A+4 B-4 C)+a (A-B+8 C) \cos (c+d x))}{(\cos (c+d x) a+a)^3}dx}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^3 \left (a (3 A+4 B-4 C)+a (A-B+8 C) \sin \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^3}dx}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle \frac {\frac {\int \frac {\cos ^2(c+d x) \left (3 (2 A+5 B-12 C) a^2+(3 A-10 B+52 C) \cos (c+d x) a^2\right )}{(\cos (c+d x) a+a)^2}dx}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (3 (2 A+5 B-12 C) a^2+(3 A-10 B+52 C) \sin \left (c+d x+\frac {\pi }{2}\right ) a^2\right )}{\left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )^2}dx}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3456 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\cos (c+d x) \left (2 (3 A+25 B-88 C) a^3+(6 A-55 B+244 C) \cos (c+d x) a^3\right )}{\cos (c+d x) a+a}dx}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {\sin \left (c+d x+\frac {\pi }{2}\right ) \left (2 (3 A+25 B-88 C) a^3+(6 A-55 B+244 C) \sin \left (c+d x+\frac {\pi }{2}\right ) a^3\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \frac {\frac {\frac {\int \frac {(6 A-55 B+244 C) \cos ^2(c+d x) a^3+2 (3 A+25 B-88 C) \cos (c+d x) a^3}{\cos (c+d x) a+a}dx}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {\int \frac {(6 A-55 B+244 C) \sin \left (c+d x+\frac {\pi }{2}\right )^2 a^3+2 (3 A+25 B-88 C) \sin \left (c+d x+\frac {\pi }{2}\right ) a^3}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\frac {\frac {\frac {\int \frac {105 a^4 (B-4 C) \cos (c+d x)}{\cos (c+d x) a+a}dx}{a}+\frac {a^2 (6 A-55 B+244 C) \sin (c+d x)}{d}}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {\frac {105 a^3 (B-4 C) \int \frac {\cos (c+d x)}{\cos (c+d x) a+a}dx+\frac {a^2 (6 A-55 B+244 C) \sin (c+d x)}{d}}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {105 a^3 (B-4 C) \int \frac {\sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx+\frac {a^2 (6 A-55 B+244 C) \sin (c+d x)}{d}}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {\frac {105 a^3 (B-4 C) \left (\frac {x}{a}-\int \frac {1}{\cos (c+d x) a+a}dx\right )+\frac {a^2 (6 A-55 B+244 C) \sin (c+d x)}{d}}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {\frac {105 a^3 (B-4 C) \left (\frac {x}{a}-\int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right ) a+a}dx\right )+\frac {a^2 (6 A-55 B+244 C) \sin (c+d x)}{d}}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
\(\Big \downarrow \) 3127 |
\(\displaystyle \frac {\frac {\frac {105 a^3 (B-4 C) \left (\frac {x}{a}-\frac {\sin (c+d x)}{d (a \cos (c+d x)+a)}\right )+\frac {a^2 (6 A-55 B+244 C) \sin (c+d x)}{d}}{3 a^2}+\frac {(3 A+25 B-88 C) \sin (c+d x) \cos ^2(c+d x)}{3 d (\cos (c+d x)+1)^2}}{5 a^2}+\frac {a (2 A+5 B-12 C) \sin (c+d x) \cos ^3(c+d x)}{5 d (a \cos (c+d x)+a)^3}}{7 a^2}-\frac {(A-B+C) \sin (c+d x) \cos ^4(c+d x)}{7 d (a \cos (c+d x)+a)^4}\) |
-1/7*((A - B + C)*Cos[c + d*x]^4*Sin[c + d*x])/(d*(a + a*Cos[c + d*x])^4) + ((a*(2*A + 5*B - 12*C)*Cos[c + d*x]^3*Sin[c + d*x])/(5*d*(a + a*Cos[c + d*x])^3) + (((3*A + 25*B - 88*C)*Cos[c + d*x]^2*Sin[c + d*x])/(3*d*(1 + Co s[c + d*x])^2) + ((a^2*(6*A - 55*B + 244*C)*Sin[c + d*x])/d + 105*a^3*(B - 4*C)*(x/a - Sin[c + d*x]/(d*(a + a*Cos[c + d*x]))))/(3*a^2))/(5*a^2))/(7* a^2)
3.4.65.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b ^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^n/( a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^(n - 1)*Simp[A*(a*d*n - b*c*(m + 1)) - B*(a*c*m + b*d*n) - d*(a*B*(m - n) + A*b*(m + n + 1))*Sin[e + f*x], x], x], x] /; Fre eQ[{a, b, c, d, e, f, A, B}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] & & NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && GtQ[n, 0] && IntegerQ[2*m] && (In tegerQ[2*n] || EqQ[c, 0])
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(a*A - b*B + a*C)*Cos[e + f*x]*(a + b* Sin[e + f*x])^m*((c + d*Sin[e + f*x])^(n + 1)/(f*(b*c - a*d)*(2*m + 1))), x ] + Simp[1/(b*(b*c - a*d)*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[A*(a*c*(m + 1) - b*d*(2*m + n + 2)) + B*(b*c*m + a *d*(n + 1)) - C*(a*c*m + b*d*(n + 1)) + (d*(a*A - b*B)*(m + n + 2) + C*(b*c *(2*m + 1) - a*d*(m - n - 1)))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c ^2 - d^2, 0] && LtQ[m, -2^(-1)]
Time = 1.91 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.61
method | result | size |
parallelrisch | \(\frac {72 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\left (\frac {13 A}{6}-\frac {310 B}{9}+\frac {2741 C}{18}\right ) \cos \left (2 d x +2 c \right )+\left (A -\frac {65 B}{9}+\frac {296 C}{9}\right ) \cos \left (3 d x +3 c \right )+\frac {35 C \cos \left (4 d x +4 c \right )}{24}+\left (\frac {17 A}{3}-\frac {730 B}{9}+\frac {3124 C}{9}\right ) \cos \left (d x +c \right )+\frac {17 A}{6}-\frac {470 B}{9}+\frac {16171 C}{72}\right ) \left (\sec ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+6720 d x \left (B -4 C \right )}{6720 a^{4} d}\) | \(118\) |
derivativedivides | \(\frac {-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}+\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{7}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{7}+\frac {3 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B +\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}-\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A +\frac {11 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}-\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-15 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+49 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {16 C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+16 \left (B -4 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d \,a^{4}}\) | \(215\) |
default | \(\frac {-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}+\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{7}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{7}+\frac {3 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B +\frac {7 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{5}-\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A +\frac {11 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) B}{3}-\frac {23 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{3}+A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-15 B \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+49 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C +\frac {16 C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+16 \left (B -4 C \right ) \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d \,a^{4}}\) | \(215\) |
risch | \(\frac {B x}{a^{4}}-\frac {4 C x}{a^{4}}-\frac {i C \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{4} d}+\frac {i {\mathrm e}^{-i \left (d x +c \right )} C}{2 a^{4} d}+\frac {2 i \left (105 A \,{\mathrm e}^{6 i \left (d x +c \right )}-420 B \,{\mathrm e}^{6 i \left (d x +c \right )}+1050 C \,{\mathrm e}^{6 i \left (d x +c \right )}+315 A \,{\mathrm e}^{5 i \left (d x +c \right )}-1890 B \,{\mathrm e}^{5 i \left (d x +c \right )}+5250 C \,{\mathrm e}^{5 i \left (d x +c \right )}+630 A \,{\mathrm e}^{4 i \left (d x +c \right )}-4130 B \,{\mathrm e}^{4 i \left (d x +c \right )}+11900 C \,{\mathrm e}^{4 i \left (d x +c \right )}+630 A \,{\mathrm e}^{3 i \left (d x +c \right )}-4970 B \,{\mathrm e}^{3 i \left (d x +c \right )}+14840 C \,{\mathrm e}^{3 i \left (d x +c \right )}+441 A \,{\mathrm e}^{2 i \left (d x +c \right )}-3570 B \,{\mathrm e}^{2 i \left (d x +c \right )}+10794 C \,{\mathrm e}^{2 i \left (d x +c \right )}+147 A \,{\mathrm e}^{i \left (d x +c \right )}-1400 B \,{\mathrm e}^{i \left (d x +c \right )}+4298 C \,{\mathrm e}^{i \left (d x +c \right )}+36 A -260 B +764 C \right )}{105 d \,a^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7}}\) | \(301\) |
norman | \(\frac {\frac {\left (B -4 C \right ) x}{a}+\frac {\left (B -4 C \right ) x \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {5 \left (B -4 C \right ) x \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {10 \left (B -4 C \right ) x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {10 \left (B -4 C \right ) x \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {5 \left (B -4 C \right ) x \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}+\frac {\left (A -15 B +65 C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}-\frac {\left (A -B +C \right ) \left (\tan ^{17}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{56 a d}-\frac {\left (2 A +5 B -12 C \right ) \left (\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{140 a d}+\frac {\left (3 A -500 B +2075 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{84 a d}+\frac {\left (6 A -107 B +452 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 a d}+\frac {\left (6 A -55 B +244 C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{84 a d}+\frac {\left (6 A +B -22 C \right ) \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{84 a d}+\frac {\left (30 A -1241 B +5084 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{84 a d}+\frac {\left (42 A -995 B +4118 C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{60 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{5} a^{3}}\) | \(391\) |
1/6720*(72*tan(1/2*d*x+1/2*c)*((13/6*A-310/9*B+2741/18*C)*cos(2*d*x+2*c)+( A-65/9*B+296/9*C)*cos(3*d*x+3*c)+35/24*C*cos(4*d*x+4*c)+(17/3*A-730/9*B+31 24/9*C)*cos(d*x+c)+17/6*A-470/9*B+16171/72*C)*sec(1/2*d*x+1/2*c)^6+6720*d* x*(B-4*C))/a^4/d
Time = 0.29 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.14 \[ \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {105 \, {\left (B - 4 \, C\right )} d x \cos \left (d x + c\right )^{4} + 420 \, {\left (B - 4 \, C\right )} d x \cos \left (d x + c\right )^{3} + 630 \, {\left (B - 4 \, C\right )} d x \cos \left (d x + c\right )^{2} + 420 \, {\left (B - 4 \, C\right )} d x \cos \left (d x + c\right ) + 105 \, {\left (B - 4 \, C\right )} d x + {\left (105 \, C \cos \left (d x + c\right )^{4} + 4 \, {\left (9 \, A - 65 \, B + 296 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (39 \, A - 620 \, B + 2636 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (24 \, A - 535 \, B + 2236 \, C\right )} \cos \left (d x + c\right ) + 6 \, A - 160 \, B + 664 \, C\right )} \sin \left (d x + c\right )}{105 \, {\left (a^{4} d \cos \left (d x + c\right )^{4} + 4 \, a^{4} d \cos \left (d x + c\right )^{3} + 6 \, a^{4} d \cos \left (d x + c\right )^{2} + 4 \, a^{4} d \cos \left (d x + c\right ) + a^{4} d\right )}} \]
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+a*cos(d*x+c))^4, x, algorithm="fricas")
1/105*(105*(B - 4*C)*d*x*cos(d*x + c)^4 + 420*(B - 4*C)*d*x*cos(d*x + c)^3 + 630*(B - 4*C)*d*x*cos(d*x + c)^2 + 420*(B - 4*C)*d*x*cos(d*x + c) + 105 *(B - 4*C)*d*x + (105*C*cos(d*x + c)^4 + 4*(9*A - 65*B + 296*C)*cos(d*x + c)^3 + (39*A - 620*B + 2636*C)*cos(d*x + c)^2 + (24*A - 535*B + 2236*C)*co s(d*x + c) + 6*A - 160*B + 664*C)*sin(d*x + c))/(a^4*d*cos(d*x + c)^4 + 4* a^4*d*cos(d*x + c)^3 + 6*a^4*d*cos(d*x + c)^2 + 4*a^4*d*cos(d*x + c) + a^4 *d)
Leaf count of result is larger than twice the leaf count of optimal. 746 vs. \(2 (189) = 378\).
Time = 6.70 (sec) , antiderivative size = 746, normalized size of antiderivative = 3.83 \[ \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\begin {cases} - \frac {15 A \tan ^{9}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {48 A \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {42 A \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {105 A \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {840 B d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {840 B d x}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {15 B \tan ^{9}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {90 B \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {280 B \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {1190 B \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {1575 B \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {3360 C d x \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {3360 C d x}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {15 C \tan ^{9}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {132 C \tan ^{7}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} - \frac {658 C \tan ^{5}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {4340 C \tan ^{3}{\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} + \frac {6825 C \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{840 a^{4} d \tan ^{2}{\left (\frac {c}{2} + \frac {d x}{2} \right )} + 840 a^{4} d} & \text {for}\: d \neq 0 \\\frac {x \left (A + B \cos {\left (c \right )} + C \cos ^{2}{\left (c \right )}\right ) \cos ^{3}{\left (c \right )}}{\left (a \cos {\left (c \right )} + a\right )^{4}} & \text {otherwise} \end {cases} \]
Piecewise((-15*A*tan(c/2 + d*x/2)**9/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840 *a**4*d) + 48*A*tan(c/2 + d*x/2)**7/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840* a**4*d) - 42*A*tan(c/2 + d*x/2)**5/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a **4*d) + 105*A*tan(c/2 + d*x/2)/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4 *d) + 840*B*d*x*tan(c/2 + d*x/2)**2/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840* a**4*d) + 840*B*d*x/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) + 15*B*t an(c/2 + d*x/2)**9/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) - 90*B*ta n(c/2 + d*x/2)**7/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) + 280*B*ta n(c/2 + d*x/2)**5/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) - 1190*B*t an(c/2 + d*x/2)**3/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) - 1575*B* tan(c/2 + d*x/2)/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) - 3360*C*d* x*tan(c/2 + d*x/2)**2/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) - 3360 *C*d*x/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) - 15*C*tan(c/2 + d*x/ 2)**9/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) + 132*C*tan(c/2 + d*x/ 2)**7/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) - 658*C*tan(c/2 + d*x/ 2)**5/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) + 4340*C*tan(c/2 + d*x /2)**3/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d) + 6825*C*tan(c/2 + d* x/2)/(840*a**4*d*tan(c/2 + d*x/2)**2 + 840*a**4*d), Ne(d, 0)), (x*(A + B*c os(c) + C*cos(c)**2)*cos(c)**3/(a*cos(c) + a)**4, True))
Time = 0.30 (sec) , antiderivative size = 356, normalized size of antiderivative = 1.83 \[ \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {C {\left (\frac {1680 \, \sin \left (d x + c\right )}{{\left (a^{4} + \frac {a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {5145 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {805 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {147 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {6720 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{4}}\right )} - 5 \, B {\left (\frac {\frac {315 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {77 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {3 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {336 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{4}}\right )} + \frac {3 \, A {\left (\frac {35 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}}}{840 \, d} \]
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+a*cos(d*x+c))^4, x, algorithm="maxima")
1/840*(C*(1680*sin(d*x + c)/((a^4 + a^4*sin(d*x + c)^2/(cos(d*x + c) + 1)^ 2)*(cos(d*x + c) + 1)) + (5145*sin(d*x + c)/(cos(d*x + c) + 1) - 805*sin(d *x + c)^3/(cos(d*x + c) + 1)^3 + 147*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 15*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 - 6720*arctan(sin(d*x + c)/(c os(d*x + c) + 1))/a^4) - 5*B*((315*sin(d*x + c)/(cos(d*x + c) + 1) - 77*si n(d*x + c)^3/(cos(d*x + c) + 1)^3 + 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 3*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4 - 336*arctan(sin(d*x + c)/(c os(d*x + c) + 1))/a^4) + 3*A*(35*sin(d*x + c)/(cos(d*x + c) + 1) - 35*sin( d*x + c)^3/(cos(d*x + c) + 1)^3 + 21*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 5*sin(d*x + c)^7/(cos(d*x + c) + 1)^7)/a^4)/d
Time = 0.39 (sec) , antiderivative size = 255, normalized size of antiderivative = 1.31 \[ \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {\frac {840 \, {\left (d x + c\right )} {\left (B - 4 \, C\right )}}{a^{4}} + \frac {1680 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{4}} - \frac {15 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 15 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 15 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 63 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 105 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 147 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 105 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 385 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 805 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 105 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1575 \, B a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 5145 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{28}}}{840 \, d} \]
integrate(cos(d*x+c)^3*(A+B*cos(d*x+c)+C*cos(d*x+c)^2)/(a+a*cos(d*x+c))^4, x, algorithm="giac")
1/840*(840*(d*x + c)*(B - 4*C)/a^4 + 1680*C*tan(1/2*d*x + 1/2*c)/((tan(1/2 *d*x + 1/2*c)^2 + 1)*a^4) - (15*A*a^24*tan(1/2*d*x + 1/2*c)^7 - 15*B*a^24* tan(1/2*d*x + 1/2*c)^7 + 15*C*a^24*tan(1/2*d*x + 1/2*c)^7 - 63*A*a^24*tan( 1/2*d*x + 1/2*c)^5 + 105*B*a^24*tan(1/2*d*x + 1/2*c)^5 - 147*C*a^24*tan(1/ 2*d*x + 1/2*c)^5 + 105*A*a^24*tan(1/2*d*x + 1/2*c)^3 - 385*B*a^24*tan(1/2* d*x + 1/2*c)^3 + 805*C*a^24*tan(1/2*d*x + 1/2*c)^3 - 105*A*a^24*tan(1/2*d* x + 1/2*c) + 1575*B*a^24*tan(1/2*d*x + 1/2*c) - 5145*C*a^24*tan(1/2*d*x + 1/2*c))/a^28)/d
Time = 1.47 (sec) , antiderivative size = 248, normalized size of antiderivative = 1.27 \[ \int \frac {\cos ^3(c+d x) \left (A+B \cos (c+d x)+C \cos ^2(c+d x)\right )}{(a+a \cos (c+d x))^4} \, dx=\frac {B\,d\,x-4\,C\,d\,x}{a^4\,d}+\frac {\left (\frac {12\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}-\frac {52\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{21}+\frac {764\,C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{105}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (\frac {16\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{21}-\frac {23\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{70}-\frac {143\,C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{105}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (\frac {9\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{70}-\frac {5\,B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{28}+\frac {8\,C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-\frac {A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{56}+\frac {B\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{56}-\frac {C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{56}}{a^4\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}+\frac {2\,C\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^4\,d} \]
(B*d*x - 4*C*d*x)/(a^4*d) + (cos(c/2 + (d*x)/2)^2*((9*A*sin(c/2 + (d*x)/2) )/70 - (5*B*sin(c/2 + (d*x)/2))/28 + (8*C*sin(c/2 + (d*x)/2))/35) - cos(c/ 2 + (d*x)/2)^4*((23*A*sin(c/2 + (d*x)/2))/70 - (16*B*sin(c/2 + (d*x)/2))/2 1 + (143*C*sin(c/2 + (d*x)/2))/105) + cos(c/2 + (d*x)/2)^6*((12*A*sin(c/2 + (d*x)/2))/35 - (52*B*sin(c/2 + (d*x)/2))/21 + (764*C*sin(c/2 + (d*x)/2)) /105) - (A*sin(c/2 + (d*x)/2))/56 + (B*sin(c/2 + (d*x)/2))/56 - (C*sin(c/2 + (d*x)/2))/56)/(a^4*d*cos(c/2 + (d*x)/2)^7) + (2*C*cos(c/2 + (d*x)/2)*si n(c/2 + (d*x)/2))/(a^4*d)